package com.mew.chess.core.common.provide;

import com.mew.common.rest.game.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@Component
@FeignClient(value = "mew-kernel-game")
public interface GameFeignService {

    @PostMapping(value = "/chess/enter")
    @ResponseBody
    ChessEnterRoomResponse enterRoom(@RequestBody ChessEnterRoomRequest request);

    @GetMapping(value = "/chess/exit/{uid}/{exittype}")
    @ResponseBody
    Integer exitRoom(@PathVariable("uid") long uid, @PathVariable("exittype") int exittype);

    @PostMapping(value = "/bet/before")
    @ResponseBody
    BetBeforeResponse betBefore(@RequestBody BetBeforeRequest request);

    @PostMapping(value = "/bet/after")
    @ResponseBody
    Integer betAfter(@RequestBody BetAfterRequest request);

    @PostMapping(value = "/chess/bet/after")
    @ResponseBody
    Integer chessBetAfter(@RequestBody List<BetAfterRequest> request);


}
